package com.xinqi.modules.sys.gpt.controller.web;

import com.xinqi.common.base.response.R;
import com.xinqi.common.satoken.utils.LoginHelper;
import com.xinqi.modules.sys.gpt.dto.rsp.ShareQuotaResultDTO;
import com.xinqi.modules.sys.gpt.service.ShareQuotaService;
import io.swagger.v3.oas.annotations.Operation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * WEB -- 邀请规则
 *
 * @author: yyzhen
 * @date: 2023/05/23
 */
@RestController
@RequestMapping("/web/share-quota")
@RequiredArgsConstructor
public class ShareQuotaWebController {
    private final ShareQuotaService shareQuotaService;

    @Operation(summary = "邀请规则--列表")
    @GetMapping("/list")
    public R<List<ShareQuotaResultDTO>> list() {
        return R.data(shareQuotaService.list(LoginHelper.getUserId()));
    }

}
